from typing import List

# 求子集，好问题啊
class Solution:
    def subsets(self, nums: List[int]) -> List[List[int]]:

        dp = list()
        dp.append([])
        for i in nums:
            new_sbset = list()
            for j in dp:
                new_sbset.append(j + [i])
            dp += new_sbset
        return dp

if __name__ == '__main__':
    nums = [1,2,3]
    solution = Solution()
    val = solution.subsets(nums)
    print(val)
